<template>
	<view class="content ffffff padding">
		<view class="paddinglr">
			<u-parse :content="content"></u-parse>
		</view>
		<view class="flexcenter margin_top5" v-if="!content">
			<!-- <image src="/static/placeholderimg.png" mode=""></image> -->
			<view class="text_a color_jiu">没有更多了~</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data(){
			return {
				content:"",
				type:1
			}
		},
		onLoad(options) {
			this.type=options['type'];
			if(options['type']==1){
				uni.setNavigationBarTitle({
					title:'用户协议'
				});
			}else if(options['type']==2){
				uni.setNavigationBarTitle({
					title:'隐私政策'
				});
			}else if(options['type']==3){
				uni.setNavigationBarTitle({
					title:'购保协议'
				});
			}
			this.getText()
		},
		methods:{
			getText() { //筛选信息
				let _this = this
				httpRequest.request('/api/index/getConfigInfo', 'GET', {
					
				}, false, false, true).then(res => {
					console.log(res);
					if(res.code==1){
						if(_this.type==1){
							_this.content=res.data.user_xy
						}else if(_this.type==2){
							_this.content=res.data.user_yszc
						}else if(_this.type==3){
							_this.content=res.data.buybxz
						}
					}else{
					
						httpRequest.toast(res.msg)
					}
				})
				

				
			},
		}
	}
</script>

<style lang="scss" scoped>
</style>